public class Login {
    private String UserName = "Jack";
    private String password = "123456";
    public void loginIn(String userName,String password)throws PassWordException,UserNameException{
       if(!userName.equals(this.UserName)){
           throw new UserNameException("用户名错误....");
        }
        if(!password.equals(this.password)){
            throw new PassWordException("密码错误....");
        }
        System.out.println("登录成功！");
    }
}
